package com.zbkj.common.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 客户端登录请求对象
 * +----------------------------------------------------------------------
 * | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
 * +----------------------------------------------------------------------
 * | Author: CRMEB Team <admin@crmeb.com>
 * +----------------------------------------------------------------------
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ClientLoginRequest对象", description="客户端登录请求对象")
public class ClientLoginRequest implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "登录类型：1=用户名密码登录，2=手机号验证码登录", required = true)
    @NotNull(message = "登录类型不能为空")
    private Integer type;

    @ApiModelProperty(value = "用户名（type=1时必填）")
    private String username;

    @ApiModelProperty(value = "密码（type=1时必填）")
    private String password;

    @ApiModelProperty(value = "手机号（type=2时必填）")
    private String phone;

    @ApiModelProperty(value = "验证码（type=2时必填）")
    private String code;

} 